<?php


namespace App\Transformers\Member;


use League\Fractal\TransformerAbstract;

class MemberShipTransFormer extends TransformerAbstract
{
    public function transform($data)
    {
    return [
         'id'=>$data->id ,
         'type' =>$data->type ?? '',
         'title' =>$data->title ?? '',
         'vip_day' =>$data->vip_day ?? '',
         'price' =>$data->price ?? '',
         'new_price' =>$data->new_price ?? '',
         'sort' =>$data->sort ?? '',
         'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
         'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
    ];

    }


}
